/**
 * @author 陈泰来
 * @version V1.0
 * @Project echo-java-base
 * @Title 披萨商店
 * @Description *
 * @Package designmodel.factorymodel2.ex1.factory
 * @date 2021/3/6 2:24 下午
 * @Copyright:学如逆水行舟，不进则退 .
 */
package designmodel.factorymodel2.ex1.factory;

import designmodel.factorymodel2.ex1.model.IPizza;

import java.util.Objects;

public class PizzaStore {

    //来了一个披萨订单
    public static IPizza orderPizza(String type) {
        IPizza pizza = SimplePizzaFactory.createPizza(type);
        if (Objects.isNull(pizza)) return null;

        pizza.prepare().bake().cut().box();
        return pizza;
    }


}
